<meta charset="UTF-8">
<?php 
//连接数据库
  include_once('dbConn.php');
	connect();
//取登录页表单数据
	$adminname=$_POST["adminname"];
	$password=$_POST["password"];
	
$sql="select * from admins where adminname='$adminname' and password='$password' ";
$rs=mysql_query($sql);
$num=mysql_num_rows($rs);
if ($num>0) {
	session_start();//启动session
	$_SESSION["adminname"]=$adminname; //将管理员用户名写入session
	echo "登录成功！0.1秒后将跳转到用户列表页<br/>";
	header("refresh:0.1;url='/final_project/ht_system/lite/userlist.php'");
}else
{   echo "登录失败！1秒后将返回登录页重新登录<br/>";
	header("refresh:1;url='/final_project/ht_system/lite/userlist.php'");
}
	 ?>
